﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media;
using System.Text;

namespace FlyingCell
{
    public class Player
    {
        //brush
        private MediaPlayer mMediaPlayer;
        private VideoDrawing mVideoDrawing;
        private DrawingBrush mDrawingBrush;

        public Player()
        {
            mMediaPlayer = new MediaPlayer();
            mVideoDrawing = new VideoDrawing();
            mDrawingBrush = new DrawingBrush();

            // check Rect
            mVideoDrawing.Rect = new Rect(0, 0, 10,10);
            mVideoDrawing.Player = mMediaPlayer;
            mDrawingBrush.Drawing = mVideoDrawing;
        }

        public DrawingBrush GetBrush()
        {
            return mDrawingBrush;
        }

        public void Open(Uri aUri)
        {
            mMediaPlayer.Open(aUri);
        }

        public void Play()
        {
            mVideoDrawing.Player.Play();
        }
    }
}
